<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        var a = prompt("请输入1-7之间的整数");
        switch(a){
            case '1' : alert("星期一"); break;
            case '2' : alert("星期二"); break;
            case '3' : alert("星期三"); break;
            case '4' : alert("星期四"); break;
            case '5' : alert("星期五"); break;
            case '6' : alert("星期六"); break;
            case '7' : alert("星期天"); break;
            }
            //case 共用代码段
            //1.3.5-"红烧肉" 2.4.6-"红烧鱼"
            switch(a){
                case "1" :
                case "3" :
                case "5" :
                    alert("红烧肉"); break;
                case "2" :
                case "4" :
                case "6" :
                    alert("红烧鱼");break;
            }

            
        
    </script>
</head>
<body>
    
</body>
</html>